package top.linruchang;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * 作用：
 *
 * @author LinRuChang
 * @version 1.0
 * @date 2020/10/27
 * @since 1.8
 **/
public class Student {

    String name = "默认";
    Integer year = 0;



    public Student() {
        System.out.println("运行Student()构造函数");
    }

    public Student(String name) {
        System.out.println("运行Student(String name)构造函数");
        this.name = name;
    }

    public Student(String name, Integer year) {
        System.out.println("运行Student(String name, Integer year)构造函数");
        this.name = name;
        this.year = year;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", year=" + year +
                '}';
    }
}
